import request from '@/request/request.js'

// 登录
export default {
  // 登录接口
  login(data) {
    return request({
      url: "/phoneLogin",
      method: "post",
      data,
    });
  },
  // 获取用户信息
  getUserInfo(token) {
    return request({
      url: "/getInfo",
      method: "get",
      params: {
        token
      },
    });
  },
  /**
   * 租房图片上传
   */
  uploadImage(file) {
    return request({
      url: '/common/upload',
      method: 'post',
      data: file
    })
  },
  uploadImages(files) {
    return request({
      url: '/common/uploads',
      method: 'post',
      data: files
    })
  },
}